package mobi.hami.huapin.dto;

import mobi.hami.huapin.model.HuaPin;
import mobi.hami.huapin.model.UserOrderDetail;

import java.util.List;

/**
 * Create by 小峰 on 2018/8/25.
 */
public class HuaPinOutPutDTO {

    private HuaPin huaPin;

    private List<UserOrderOut> userOrderOutList;



    public HuaPin getHuaPin() {
        return huaPin;
    }

    public void setHuaPin(HuaPin huaPin) {
        this.huaPin = huaPin;
    }

    public List<UserOrderOut> getUserOrderOutList() {
        return userOrderOutList;
    }

    public void setUserOrderOutList(List<UserOrderOut> userOrderOutList) {
        this.userOrderOutList = userOrderOutList;
    }


    public boolean userHuapinAdd(UserOrderDTO userOrderDTO, List<UserOrderDetail> userOrderDetailList)
    {
        UserOrderOut huaPinOut= new UserOrderOut();
        huaPinOut.setUserOrderDetailList(userOrderDetailList);
        huaPinOut.setUserOrderDTO(userOrderDTO);
        return getUserOrderOutList().add(huaPinOut);
    }



    public class UserOrderOut{
        UserOrderDTO userOrderDTO;
        List<UserOrderDetail>  userOrderDetailList;

        public UserOrderDTO getUserOrderDTO() {
            return userOrderDTO;
        }

        public void setUserOrderDTO(UserOrderDTO userOrderDTO) {
            this.userOrderDTO = userOrderDTO;
        }

        public List<UserOrderDetail> getUserOrderDetailList() {
            return userOrderDetailList;
        }

        public void setUserOrderDetailList(List<UserOrderDetail> userOrderDetailList) {
            this.userOrderDetailList = userOrderDetailList;
        }
    }
}


